﻿<Window x:Class="TibcoQueueMonitor.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="clr-namespace:TibcoQueueMonitor.Controls"
        Title="EMS Queue Monitor" Height="500" Width="600" Loaded="Window_Loaded" MinWidth="600" MinHeight="500" ResizeMode="CanResize">
    <Window.Resources>
        <!-- the set of style element below define the collapsing animation of the profile bar -->
        <!-- Sourced from: http://mattserbinski.com/blog/animating-expander -->
        <LinearGradientBrush x:Key="ButtonNormalBackgroundFill" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="White" Offset="0"/>
            <GradientStop Color="#FFE3E5F0" Offset="0.5"/>
            <GradientStop Color="#FFC6C5D7" Offset="1.0"/>
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="ExpanderShadowFill" EndPoint="0,1" StartPoint="0,0">
            <GradientStop Color="Transparent" Offset="0.5"/>
            <GradientStop Color="#30111111" Offset="1"/>
        </LinearGradientBrush>
        <Style x:Key="ExpanderHeaderFocusVisual">
            <Setter Property="Control.Template">
                <Setter.Value>
                    <ControlTemplate>
                        <Border>
                            <Rectangle SnapsToDevicePixels="true" Margin="0" Stroke="Black" StrokeDashArray="1 2" StrokeThickness="1"/>
                        </Border>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="ExpanderDownHeaderStyle" TargetType="{x:Type ToggleButton}">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type ToggleButton}">
                        <Border Padding="{TemplateBinding Padding}">
                            <Grid SnapsToDevicePixels="False" Background="Transparent">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="19"/>
                                    <ColumnDefinition Width="*"/>
                                </Grid.ColumnDefinitions>
                                <Ellipse HorizontalAlignment="Center" x:Name="circle" VerticalAlignment="Center" Width="19" Height="19" Fill="{DynamicResource ButtonNormalBackgroundFill}" Stroke="DarkGray"/>
                                <Ellipse Visibility="Hidden" HorizontalAlignment="Center" x:Name="shadow" VerticalAlignment="Center" Width="17" Height="17" Fill="{DynamicResource ExpanderShadowFill}"/>
                                <Path SnapsToDevicePixels="false" HorizontalAlignment="Center" x:Name="arrow" VerticalAlignment="Center" Stroke="#666" StrokeThickness="2" Data="M 1,1.5 L 4.5,5 L 8,1.5"/>
                                <ContentPresenter SnapsToDevicePixels="True" HorizontalAlignment="Left" Margin="4,0,0,0" VerticalAlignment="Center" Grid.Column="1" RecognizesAccessKey="True"/>
                            </Grid>
                        </Border>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsChecked" Value="true">
                                <Setter Property="Data" TargetName="arrow" Value="M 1,4.5  L 4.5,1  L 8,4.5"/>
                            </Trigger>
                            <Trigger Property="IsMouseOver" Value="true">
                                <Setter Property="Stroke" TargetName="circle" Value="#666"/>
                                <Setter Property="Stroke" TargetName="arrow" Value="#222"/>
                                <Setter Property="Visibility" TargetName="shadow" Value="Visible"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="ExpanderRightHeaderStyle" TargetType="{x:Type ToggleButton}">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type ToggleButton}">
                        <Border Padding="{TemplateBinding Padding}">
                            <Grid SnapsToDevicePixels="False" Background="Transparent">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="19"/>
                                    <RowDefinition Height="*"/>
                                </Grid.RowDefinitions>
                                <Grid>
                                    <Grid.LayoutTransform>
                                        <TransformGroup>
                                            <TransformGroup.Children>
                                                <TransformCollection>
                                                    <RotateTransform Angle="-90"/>
                                                </TransformCollection>
                                            </TransformGroup.Children>
                                        </TransformGroup>
                                    </Grid.LayoutTransform>
                                    <Ellipse HorizontalAlignment="Center" x:Name="circle" VerticalAlignment="Center" Width="19" Height="19" Fill="{DynamicResource ButtonNormalBackgroundFill}" Stroke="DarkGray"/>
                                    <Ellipse Visibility="Hidden" HorizontalAlignment="Center" x:Name="shadow" VerticalAlignment="Center" Width="17" Height="17" Fill="{DynamicResource ExpanderShadowFill}"/>
                                    <Path SnapsToDevicePixels="false" HorizontalAlignment="Center" x:Name="arrow" VerticalAlignment="Center" Stroke="#666" StrokeThickness="2" Data="M 1,1.5  L 4.5,5  L 8,1.5"/>
                                </Grid>
                                <ContentPresenter SnapsToDevicePixels="True" HorizontalAlignment="Center" Margin="0,4,0,0" VerticalAlignment="Top" Grid.Row="1" RecognizesAccessKey="True"/>
                            </Grid>
                        </Border>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsChecked" Value="true">
                                <Setter Property="Data" TargetName="arrow" Value="M 1,4.5  L 4.5,1  L 8,4.5"/>
                            </Trigger>
                            <Trigger Property="IsMouseOver" Value="true">
                                <Setter Property="Stroke" TargetName="circle" Value="#666"/>
                                <Setter Property="Stroke" TargetName="arrow" Value="#222"/>
                                <Setter Property="Visibility" TargetName="shadow" Value="Visible"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="ExpanderUpHeaderStyle" TargetType="{x:Type ToggleButton}">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type ToggleButton}">
                        <Border Padding="{TemplateBinding Padding}">
                            <Grid SnapsToDevicePixels="False" Background="Transparent">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="19"/>
                                    <ColumnDefinition Width="*"/>
                                </Grid.ColumnDefinitions>
                                <Grid>
                                    <Grid.LayoutTransform>
                                        <TransformGroup>
                                            <TransformGroup.Children>
                                                <TransformCollection>
                                                    <RotateTransform Angle="180"/>
                                                </TransformCollection>
                                            </TransformGroup.Children>
                                        </TransformGroup>
                                    </Grid.LayoutTransform>
                                    <Ellipse HorizontalAlignment="Center" x:Name="circle" VerticalAlignment="Center" Width="19" Height="19" Fill="{DynamicResource ButtonNormalBackgroundFill}" Stroke="DarkGray"/>
                                    <Ellipse Visibility="Hidden" HorizontalAlignment="Center" x:Name="shadow" VerticalAlignment="Center" Width="17" Height="17" Fill="{DynamicResource ExpanderShadowFill}"/>
                                    <Path SnapsToDevicePixels="false" HorizontalAlignment="Center" x:Name="arrow" VerticalAlignment="Center" Stroke="#666" StrokeThickness="2" Data="M 1,1.5  L 4.5,5  L 8,1.5"/>
                                </Grid>
                                <ContentPresenter SnapsToDevicePixels="True" HorizontalAlignment="Left" Margin="4,0,0,0" VerticalAlignment="Center" Grid.Column="1" RecognizesAccessKey="True"/>
                            </Grid>
                        </Border>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsChecked" Value="true">
                                <Setter Property="Data" TargetName="arrow" Value="M 1,4.5  L 4.5,1  L 8,4.5"/>
                            </Trigger>
                            <Trigger Property="IsMouseOver" Value="true">
                                <Setter Property="Stroke" TargetName="circle" Value="#666"/>
                                <Setter Property="Stroke" TargetName="arrow" Value="#222"/>
                                <Setter Property="Visibility" TargetName="shadow" Value="Visible"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="ExpanderLeftHeaderStyle" TargetType="{x:Type ToggleButton}">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type ToggleButton}">
                        <Border Padding="{TemplateBinding Padding}">
                            <Grid SnapsToDevicePixels="False" Background="Transparent">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="19"/>
                                    <RowDefinition Height="*"/>
                                </Grid.RowDefinitions>
                                <Grid>
                                    <Grid.LayoutTransform>
                                        <TransformGroup>
                                            <TransformGroup.Children>
                                                <TransformCollection>
                                                    <RotateTransform Angle="90"/>
                                                </TransformCollection>
                                            </TransformGroup.Children>
                                        </TransformGroup>
                                    </Grid.LayoutTransform>
                                    <Ellipse HorizontalAlignment="Center" x:Name="circle" VerticalAlignment="Center" Width="19" Height="19" Fill="{DynamicResource ButtonNormalBackgroundFill}" Stroke="DarkGray"/>
                                    <Ellipse Visibility="Hidden" HorizontalAlignment="Center" x:Name="shadow" VerticalAlignment="Center" Width="17" Height="17" Fill="{DynamicResource ExpanderShadowFill}"/>
                                    <Path SnapsToDevicePixels="false" HorizontalAlignment="Center" x:Name="arrow" VerticalAlignment="Center" Stroke="#666" StrokeThickness="2" Data="M 1,1.5 L 4.5,5 L 8,1.5"/>
                                </Grid>
                                <ContentPresenter SnapsToDevicePixels="True" HorizontalAlignment="Center" Margin="0,4,0,0" VerticalAlignment="Top" Grid.Row="1" RecognizesAccessKey="True"/>
                            </Grid>
                        </Border>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsChecked" Value="true">
                                <Setter Property="Data" TargetName="arrow" Value="M 1,4.5  L 4.5,1  L 8,4.5"/>
                            </Trigger>
                            <Trigger Property="IsMouseOver" Value="true">
                                <Setter Property="Stroke" TargetName="circle" Value="#666"/>
                                <Setter Property="Stroke" TargetName="arrow" Value="#222"/>
                                <Setter Property="Visibility" TargetName="shadow" Value="Visible"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="ExpanderAnimationStyle" TargetType="{x:Type Expander}">
            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
            <Setter Property="Background" Value="Transparent"/>
            <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
            <Setter Property="VerticalContentAlignment" Value="Stretch"/>
            <Setter Property="BorderBrush" Value="Transparent"/>
            <Setter Property="BorderThickness" Value="1"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Expander}">
                        <ControlTemplate.Resources>
                            <Storyboard x:Key="Timeline1">
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:0.25" Storyboard.TargetName="ExpandSite" Storyboard.TargetProperty="(FrameworkElement.LayoutTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:0.25" Value="1"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                            <Storyboard x:Key="Timeline2">
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.25" Storyboard.TargetName="ExpandSite" Storyboard.TargetProperty="(FrameworkElement.LayoutTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:0.25" Value="0"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                        </ControlTemplate.Resources>
                        <Border SnapsToDevicePixels="true" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="3">
                            <DockPanel>
                                <ToggleButton FontFamily="{TemplateBinding FontFamily}" FontSize="{TemplateBinding FontSize}" FontStretch="{TemplateBinding FontStretch}" FontStyle="{TemplateBinding FontStyle}" FontWeight="{TemplateBinding FontWeight}" Foreground="{TemplateBinding Foreground}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Padding="{TemplateBinding Padding}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" FocusVisualStyle="{StaticResource ExpanderHeaderFocusVisual}" Margin="1" MinHeight="0" MinWidth="0" x:Name="HeaderSite" Style="{StaticResource ExpanderDownHeaderStyle}" Content="{TemplateBinding Header}" ContentTemplate="{TemplateBinding HeaderTemplate}" ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}" IsChecked="{Binding Path=IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" DockPanel.Dock="Top"/>
                                <ContentPresenter Focusable="false" Visibility="Visible" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" x:Name="ExpandSite" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" DockPanel.Dock="Bottom">
                                    <ContentPresenter.LayoutTransform>
                                        <TransformGroup>
                                            <ScaleTransform ScaleX="1" ScaleY="0"/>
                                            <SkewTransform AngleX="0" AngleY="0"/>
                                            <RotateTransform Angle="0"/>
                                            <TranslateTransform X="0" Y="0"/>
                                        </TransformGroup>
                                    </ContentPresenter.LayoutTransform>
                                </ContentPresenter>
                            </DockPanel>
                        </Border>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsExpanded" Value="True">
                                <Trigger.EnterActions>
                                    <BeginStoryboard Storyboard="{StaticResource Timeline1}"/>
                                </Trigger.EnterActions>
                                <Trigger.ExitActions>
                                    <BeginStoryboard Storyboard="{StaticResource Timeline2}"/>
                                </Trigger.ExitActions>
                            </Trigger>
                            <Trigger Property="ExpandDirection" Value="Right">
                                <Setter Property="DockPanel.Dock" TargetName="ExpandSite" Value="Right"/>
                                <Setter Property="DockPanel.Dock" TargetName="HeaderSite" Value="Left"/>
                                <Setter Property="Style" TargetName="HeaderSite" Value="{StaticResource ExpanderRightHeaderStyle}"/>
                            </Trigger>
                            <Trigger Property="ExpandDirection" Value="Up">
                                <Setter Property="DockPanel.Dock" TargetName="ExpandSite" Value="Top"/>
                                <Setter Property="DockPanel.Dock" TargetName="HeaderSite" Value="Bottom"/>
                                <Setter Property="Style" TargetName="HeaderSite" Value="{StaticResource ExpanderUpHeaderStyle}"/>
                            </Trigger>
                            <Trigger Property="ExpandDirection" Value="Left">
                                <Setter Property="DockPanel.Dock" TargetName="ExpandSite" Value="Left"/>
                                <Setter Property="DockPanel.Dock" TargetName="HeaderSite" Value="Right"/>
                                <Setter Property="Style" TargetName="HeaderSite" Value="{StaticResource ExpanderLeftHeaderStyle}"/>
                            </Trigger>
                            <Trigger Property="IsEnabled" Value="false">
                                <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </Window.Resources>
    <Grid Name="gridMain">
        <Grid.RowDefinitions>
            <RowDefinition Height="200" MaxHeight="200" MinHeight="200" />
            <RowDefinition Height="264*" />
            <RowDefinition Height="30" />
        </Grid.RowDefinitions>
        <CheckBox Content="Auto-Refresh" Height="16" Margin="0,0,12,79" Name="chkbAutoRefresh" VerticalAlignment="Bottom" FontSize="10" HorizontalAlignment="Right" Width="75" Unchecked="chkbAutoRefresh_Unchecked" Checked="chkbAutoRefresh_Checked" />
        <Label Content="Username" FontSize="12" HorizontalAlignment="Left" Margin="12,112,0,0" Name="lblUsername" Padding="1" VerticalAlignment="Top" FontWeight="Bold" />
        <Label Content="Port" FontSize="12" HorizontalAlignment="Left" Margin="12,78,0,0" Name="lblPort" Padding="1" VerticalAlignment="Top" FontWeight="Bold" />
        <Label Content="[Username]" FontSize="12" HorizontalAlignment="Left" Margin="150,115,0,0" Name="lblUsernameValue" Padding="1" VerticalAlignment="Top" FontFamily="Courier New" />
        <Label Content="[Port]" FontSize="12" HorizontalAlignment="Left" Margin="150,81,0,0" Name="lblPortValue" Padding="1" VerticalAlignment="Top" FontFamily="Courier New" />
        <Label Content="[EMS Server]" FontSize="12" HorizontalAlignment="Left" Margin="150,47,0,0" Name="lblEmsServerValue" Padding="1" VerticalAlignment="Top" FontFamily="Courier New" />
        <Label Content="EMS Server Hostname" FontSize="12" HorizontalAlignment="Left" Margin="12,44,0,0" Name="lblEmsServer" Padding="1" VerticalAlignment="Top" FontWeight="Bold" />
        <Label Grid.Row="0" Content="Last Refresh: None" FontSize="10" HorizontalAlignment="Right" Name="lblLastRefresh" Padding="1" VerticalAlignment="Bottom" Width="170" FontStyle="Italic" HorizontalContentAlignment="Right" Height="23" Margin="0,0,10,50" />
        <Button Grid.Row="0" Content="Refresh" Height="50" HorizontalAlignment="Right" Name="btnRefresh" VerticalAlignment="Bottom" Width="75" Click="btnRefresh_Click" MinWidth="75" MinHeight="50" MaxWidth="75" MaxHeight="50" Margin="0,0,10,5" />
        <TabControl Grid.Row="1" HorizontalAlignment="Stretch" Name="tabCtrlQueues" VerticalAlignment="Stretch" Width="Auto" Margin="0">
            <TabControl.Resources>
                <!-- The following cell styles prevent keyboard focusing from occuring within the cells -->
                <!-- Pulled from 'http://stackoverflow.com/questions/2111281/disable-tabstop-between-columns-in-a-wpf-datagrid' -->
                <Style x:Key="SelectableCellStyle"  TargetType="{x:Type DataGridCell}">
                    <Setter Property="KeyboardNavigation.IsTabStop" Value="True" />
                    <Style.Triggers>
                        <Trigger Property="IsSelected" Value="True">
                            <Setter Property="KeyboardNavigation.IsTabStop" Value="False" />
                        </Trigger>
                    </Style.Triggers>
                </Style>
            </TabControl.Resources>
            <TabItem Header="Available Queues" Name="tabAvailableQueues">
                <Grid Name="gridAvailableQueues">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="30" MaxHeight="30" MinHeight="30" />
                        <RowDefinition Height="208*" />
                    </Grid.RowDefinitions>
                    <TextBox Height="23" Margin="58,4,5,0" Name="txtbAvailableQueueSearch" VerticalAlignment="Top" TextChanged="txtbAvailableQueueSearch_TextChanged" />
                    <Label Content="Search:" Height="28" HorizontalAlignment="Left" Margin="4,2,0,0" Name="lblAvailableQueueSearch" VerticalAlignment="Top" />
                    <DataGrid AutoGenerateColumns="False" Grid.Row="1" Height="Auto" HorizontalAlignment="Stretch" Margin="0" Name="dgAvailableQueues" VerticalAlignment="Stretch" Width="Auto" HeadersVisibility="Column" SelectionMode="Single" CanUserResizeRows="False" CanUserReorderColumns="False" CanUserSortColumns="True" ColumnWidth="Auto" DataContext="{Binding}" IsReadOnly="True" ItemsSource="{Binding}" AlternationCount="1" AlternatingRowBackground="#FFEBEBEB" HorizontalGridLinesBrush="#FFD8D8D8" Background="White" VerticalGridLinesBrush="#FFD8D8D8" MouseDoubleClick="dgAvailableQueues_MouseDoubleClick" LoadingRow="dgAvailableQueues_LoadingRow" CellStyle="{StaticResource SelectableCellStyle}">
                        <DataGrid.Columns>
                            <DataGridTextColumn Header="Queue Name" Binding="{Binding Path=QueueName}" Width="*" />
                            <DataGridTextColumn Header="Receivers" Binding="{Binding Path=Receivers}" />
                            <DataGridTextColumn Header="Message Count" Binding="{Binding Path=MessageCount}" />
                            <DataGridTextColumn Header="Total Queue Size KB" Binding="{Binding Path=TotalMessageSizeKB}" />
                        </DataGrid.Columns>
                    </DataGrid>
                </Grid>
            </TabItem>
            <TabItem Header="Current Connections" Name="tabConnections">
                <Grid Name="gridCurrentConnections">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="30" MaxHeight="30" MinHeight="30" />
                        <RowDefinition Height="208*" />
                    </Grid.RowDefinitions>
                    <TextBox Height="23" Margin="58,4,5,0" Name="txtbCurrentConnectionsSearch" VerticalAlignment="Top" TextChanged="txtbCurrentConnectionsSearch_TextChanged" />
                    <Label Content="Search:" Height="28" HorizontalAlignment="Left" Margin="4,2,0,0" Name="lblCurrentConnectionsSearch" VerticalAlignment="Top" />
                    <DataGrid AlternatingRowBackground="#FFEBEBEB" AlternationCount="1" AutoGenerateColumns="False" Background="White" CanUserReorderColumns="False" CanUserResizeRows="False" CanUserSortColumns="True" ColumnWidth="Auto" DataContext="{Binding}" Grid.Row="1" HeadersVisibility="Column" Height="Auto" HorizontalAlignment="Stretch" HorizontalGridLinesBrush="#FFD8D8D8" IsReadOnly="True" ItemsSource="{Binding}" Margin="0" Name="dgCurrentConnections" SelectionMode="Single" VerticalAlignment="Stretch" Width="Auto" VerticalGridLinesBrush="#FFD8D8D8" CellStyle="{StaticResource SelectableCellStyle}">
                        <DataGrid.Columns>
                            <DataGridTextColumn Binding="{Binding Path=Host}" Header="Host (Machine)" Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=Environment}" Header="Environment" />
                            <DataGridTextColumn Binding="{Binding Path=EnvType}" Header="Type" />
                            <DataGridTextColumn Binding="{Binding Path=QueueName}" Header="Connected To" Width="Auto" MinWidth="20" />
                            <DataGridTextColumn Binding="{Binding Path=User}" Header="Service Account" />
                            <DataGridTextColumn Binding="{Binding Path=Uptime}" Header="Time Connected" />
                            <DataGridTextColumn Binding="{Binding Path=Active}" Header="Active" />
                            <DataGridTextColumn Binding="{Binding Path=SSLEnabled}" Header="SSL Enabled" />
                            <DataGridTextColumn Binding="{Binding Path=ClientType}" Header="Client Type" />
                        </DataGrid.Columns>
                    </DataGrid>
                </Grid>
            </TabItem>
        </TabControl>
        <StatusBar Grid.Row="2" Height="Auto" Margin="0" Name="statusBar" VerticalAlignment="Stretch">
            <Label Grid.Row="2" HorizontalAlignment="Stretch" Name="lblStatusLabel" VerticalAlignment="Stretch" Padding="0" />
        </StatusBar>
        <Expander Header="Profiles" HorizontalAlignment="Stretch" Name="expProfiles" Opacity="1" VerticalAlignment="Top" Background="White" BorderBrush="Black" Collapsed="expProfiles_ExpandOrCollapse" Expanded="expProfiles_ExpandOrCollapse" Style="{DynamicResource ExpanderAnimationStyle}" IsExpanded="False" Height="Auto" Focusable="False">
            <local:Profile x:Name="profileCtrl" Height="175" VerticalAlignment="Top" ProfilesRefreshed="profileCtrl_ProfilesRefreshed" ProfileSelectionChanged="profileCtrl_ProfileSelectionChanged" StatusNotification="profileCtrl_StatusNotification" LostKeyboardFocus="profileCtrl_LostKeyboardFocus" GotKeyboardFocus="profileCtrl_GotKeyboardFocus" />
        </Expander>
    </Grid>
</Window>
